package com.globopt.global.algorithm;

/**
 * This is helper class what contains the algorithm parameters.
 * 
 * @author Richard Gasztany 2012.11.29.
 * 
 */
public class Opts {
	private int n; // number of selected random point in each iteration
	private double gammak;
	private double rk;
	private int k; // maximum iteration number
	private int maximumFunctionEvaluation;
	private int maximumNumberOfLocalMinimum;
	private Method method;

	private enum Display {
		on, off, end
	}

	private Display display;

	/**
	 * Init
	 */
	public Opts() {
		this.n = 100;
		this.gammak = 0.6;
		this.rk = 1.0e-6;
		this.k = 100;
		this.maximumFunctionEvaluation = 100000;
		this.maximumNumberOfLocalMinimum = 100;
		this.method = new Unirandi(1000);
		this.display = Display.on;
	}

	/**
	 * @return the n
	 */
	public int getN() {
		return n;
	}

	/**
	 * @param n
	 *            the n to set
	 */
	public void setN(int n) {
		this.n = n;
	}

	/**
	 * @return the gammak
	 */
	public double getGammak() {
		return gammak;
	}

	/**
	 * @param gammak
	 *            the gammak to set
	 */
	public void setGammak(double gammak) {
		this.gammak = gammak;
	}

	/**
	 * @return the rk
	 */
	public double getRk() {
		return rk;
	}

	/**
	 * @param rk
	 *            the rk to set
	 */
	public void setRk(double rk) {
		this.rk = rk;
	}

	/**
	 * @return the maximumFunctionEvaluation
	 */
	public int getMaximumFunctionEvaluation() {
		return maximumFunctionEvaluation;
	}

	/**
	 * @param maximumFunctionEvaluation
	 *            the maximumFunctionEvaluation to set
	 */
	public void setMaximumFunctionEvaluation(int maximumFunctionEvaluation) {
		this.maximumFunctionEvaluation = maximumFunctionEvaluation;
	}

	/**
	 * @return the maximumNumberOfLocalMinimum
	 */
	public int getMaximumNumberOfLocalMinimum() {
		return maximumNumberOfLocalMinimum;
	}

	/**
	 * @param maximumNumberOfLocalMinimum
	 *            the maximumNumberOfLocalMinimum to set
	 */
	public void setMaximumNumberOfLocalMinimum(int maximumNumberOfLocalMinimum) {
		this.maximumNumberOfLocalMinimum = maximumNumberOfLocalMinimum;
	}

	/**
	 * @return the method
	 */
	public Method getMethod() {
		return method;
	}

	/**
	 * @param method
	 *            the method to set
	 */
	public void setMethod(Method method) {
		this.method = method;
	}

	/**
	 * @return the display
	 */
	public Display getDisplay() {
		return display;
	}

	/**
	 * @param display
	 *            the display to set
	 */
	public void setDisplay(Display display) {
		this.display = display;
	}

	/**
	 * @return the k
	 */
	public int getK() {
		return k;
	}

	/**
	 * @param k
	 *            the k to set
	 */
	public void setK(int k) {
		this.k = k;
	}
}
